<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>粉丝团成员信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="/web/res/css/xadmin.css">
    <script src="/web/res/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/web/res/js/xadmin.js"></script>
    <script type="text/javascript" src="/web/res/js/common.js"></script>
</head>

<div style="background-color: white;">
    <div class="layui-fluid" id="orderEdit">
        <form class="layui-form layui-col-space5" type="post"  action="/after/fansclub/fans">
            <div class="layui-input-inline layui-show-xs-block">
                <input type="hidden" class="layui-input" value="${(id)!''}"  name="id" >
            </div>
            <div class="layui-input-inline layui-show-xs-block">
                <input type="text" class="layui-input" value="${(nick)!''}" placeholder="昵称"  name="nick" >
            </div>
            <div class="layui-input-inline layui-show-xs-block">
                <input type="text" class="layui-input" value="${(phone)!''}" placeholder="手机号"  name="phone" >
            </div>
            加入时间：
            <div class="layui-input-inline layui-show-xs-block">
                <input class="layui-input" placeholder="开始时间" autocomplete="off" value="${(startDate)!''}" name="startDate" id="startdate">
            </div>
            <div class="layui-input-inline layui-show-xs-block">
                <input class="layui-input" placeholder="结束时间" autocomplete="off" value="${(endDate)!''}" name="endDate" id="enddate">
            </div>
            <button class="layui-btn"  lay-submit lay-filter="search"  >
                <i class="layui-icon">&#xe615;</i>搜索
            </button>
        </form>
        <div class="layui-card-body"   style="overflow:auto">
            <table class="layui-table layui-form tableH"   lay-size="sm"  id="tables">
                <thead>
                <tr>
                    <th>粉丝团id</th>
                    <th>用户id</th>
                    <th>粉丝头像</th>
                    <th>粉丝名称</th>
                    <th>粉丝电话</th>
                    <th>粉丝等级</th>
                    <th>加入时间</th>
                </tr>
                </thead>
                <tbody>
                粉丝
                <#if list?? && (list?size > 0) >
                <#list list as user>
                <tr>
                    <td>${(user.followerid?c)!''}</td>
                    <td>${(user.userid?c)!''}</td>
                    <td>
                        <#if user.pic?? && user.pic != ''>
                            <a href="javascript:void(0);" class="img_biges" title="${(user.pic)!''}">
                            <img src="${(user.pic)!''}" style=" width:35px;height:35px;"/>
                            <#else>
                            <div class="divimg"><i class="layui-icon layui-icon-picture-fine"></i>
                            </div>
                        </#if>
                    </td>
                    <td>${user.nick!''}</td>
                    <td>${user.phone!''}</td>
                    <td>${user.grade!''}</td>
                    <td><#if user.createtime?exists>${(user.createtime?string("yyyy-MM-dd HH:mm:ss"))!}</#if></td>
                </tr>
                </#list>
                <#else>
                <tr>
                    <td colspan="7" style="text-align: center;">暂无记录</td>
                </tr>
            </#if>
            </tbody>
            </table>
        </div>
        <!-- 分页条 -->
        <div id="pager" style="text-align: center;"></div>

    </div>
    <script>
        layui.use(['laydate', 'form', 'table'], function () {
            let $ = layui.$;
            var laydate = layui.laydate;
            var form = layui.form;
            var table = layui.table;

            //执行一个laydate实例
            laydate.render({
                elem: '#startdate' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#enddate' //指定元素
            });

            $(".img_biges").click(function(){
                var url = $(this).attr('title');
                var xbcmz =url.split(',');
                $.each(xbcmz, function (index, item) {
                    showimg(item)
                })
            });



        });
    </script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script>
        layui.use(['laypage', 'layer', 'form'], function(){
            let $ = layui.$;
            var laypage = layui.laypage
                ,form = layui.form
                ,layer = layui.layer;

            laypage.render({
                elem: 'pager'
                ,count: ${(splitPage.totalCount?c)!''}
                ,limit: ${(splitPage.pageSize?c)!''}
                ,curr: ${(splitPage.pageIndex?c)!''}
                ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
                ,jump: function(obj, first){
                    //首次不执行
                    if(!first){
                        var myform = document.forms[0];
                        // alert("formName:"+myform.id);
                        var pageIndex = document.createElement("input");
                        pageIndex.name="pageIndex";
                        pageIndex.type="hidden";
                        pageIndex.value=obj.curr;
                        myform.appendChild(pageIndex);

                        var pageSize = document.createElement("input");
                        pageSize.name="pageSize";
                        pageSize.type="hidden";
                        pageSize.value=obj.limit;
                        myform.appendChild(pageSize);
                        // myform.submit();

                        // $("button[lay-filter]")
                        // form.on('submit(button[lay-filter])', function(data){
                        //     // layer.msg(JSON.stringify(data.field));
                        //     // return false;
                        // });
                        // var submitBtn = $("button[lay-submit]");
                        // alert(submitBtn);
                        // console.log(submitBtn)
                        // layer.msg(JSON.stringify(submitBtn));

                        // $('[lay-filter="search"]').click();
                        // $('#chaxun').click();
                        $("button[lay-submit]:eq(0)").click();
                        // $("button[lay-submit]")[0].click();
                        // alert($("#formsubmit").attr("action")+"_获取数量："+obj.limit+"_页码数："+obj.curr);
                        // console.log(obj)
                    }
                }
            });
        });
    </script>
    </body>

</html>